/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package irsystem.scenario;

import java.io.Serializable;

/**
 *
 * @author Cerulean
 */
public class ScenarioOption implements Serializable
{
    public final static int TF_RAW=0;
    public final static int TF_BINARY=1;
    public final static int TF_LOGARITHMIC=2;
    public final static int TF_AUGMENTED=3;
    
    boolean useStemming;
    boolean useStopword;
    int termFrequency;
    boolean useIDF;
    boolean useNormalization;

    public ScenarioOption(boolean useStemming, boolean useStopword, int termWeighting, boolean useIDF, boolean useNormalization)
    {
        this.useStemming = useStemming;
        this.useStopword = useStopword;
        this.termFrequency = termWeighting;
        this.useIDF = useIDF;
        this.useNormalization = useNormalization;
    }

    public ScenarioOption()
    {
    }

    public void setTermWeighting(int termWeighting)
    {
        this.termFrequency = termWeighting;
    }

    public void setUseIDF(boolean useIDF)
    {
        this.useIDF = useIDF;
    }

    public void setUseNormalization(boolean useNormalization)
    {
        this.useNormalization = useNormalization;
    }

    public void setUseStemming(boolean useStemming)
    {
        this.useStemming = useStemming;
    }

    public void setUseStopword(boolean useStopword)
    {
        this.useStopword = useStopword;
    }

    public int getTermFrequency()
    {
        return termFrequency;
    }

    public boolean isUseIDF()
    {
        return useIDF;
    }

    public boolean isUseNormalization()
    {
        return useNormalization;
    }

    public boolean isUseStemming()
    {
        return useStemming;
    }

    public boolean isUseStopword()
    {
        return useStopword;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj==null)
            return false;
        ScenarioOption opt=(ScenarioOption) obj;
        if(opt==null)
        {
            return false;
        }
        else
        {
            return useIDF==opt.useIDF &&
                    useNormalization==opt.useNormalization &&
                    useStemming==opt.useStemming &&
                    useStopword==opt.useStopword &&
                    termFrequency==opt.termFrequency;
        }
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * hash + (this.useStemming ? 1 : 0);
        hash = 59 * hash + (this.useStopword ? 1 : 0);
        hash = 59 * hash + this.termFrequency;
        hash = 59 * hash + (this.useIDF ? 1 : 0);
        hash = 59 * hash + (this.useNormalization ? 1 : 0);
        return hash;
    }
    
    
}
